package com.cqsd.entry.a.b.c;

import com.cqsd.ioc.annotation.Component;
import com.cqsd.ioc.annotation.Value;
import com.cqsd.ioc.trait.use.InitalizingBean;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author caseycheng
 * @date 2023/3/24-23:05
 **/
@Component
public class StuService implements InitalizingBean {
    private static final Logger log= LogManager.getLogger(StuService.class);
    @Value("${app.config.name.value}")
    private String info;
    private final EmpService empService;

    public StuService(EmpService empService) {
        this.empService = empService;
        log.trace("我被构建了");
        empService.fac();
    }

    /**
     * 自定义的bean初始化
     */
    @Override
    public void afterPropertiesSet() {
        log.trace(info);
    }
}
